Memory system, memory controller, and semiconductor memory device

ABSTRACT

According to one embodiment, a memory system includes a memory controller configured to send a first command set including arithmetic operation target data and an address that designates a memory cell to store weight data; and a nonvolatile semiconductor memory configured to receive the first command set from the memory controller, read the weight data from the memory cell designated by the address, perform an arithmetic operation based on the arithmetic operation target data and the weight data, and send arithmetic operation result data to the memory controller.

CROSS-REFERENCE TO RELATED APPLICATIONS

This application is a Continuation Application of U.S. application Ser.No. 16/804,037, filed Feb. 28, 2020, which is based upon and claims thebenefit of priority from prior Japanese Patent Application No.2019-113565, filed Jun. 19, 2019, the entire contents of all of whichare incorporated herein by reference.

FIELD

Embodiments described herein relate generally to a memory system, memorycontroller, and semiconductor memory device used for a neural network.

BACKGROUND

Development of artificial intelligence (AI) is progressing. As an AItechnology, a neural network has been considered. The neural network isa model devised by referring to brain neurons and synapses, and includesat least two steps of learning and identification. In the learning step,features are learned from multiple inputs, and a neural network foridentification processing is constructed. In the identification step,what the new input is identified by using the constructed neuralnetwork.

BRIEF DESCRIPTION OF THE DRAWINGS

FIG. 1 is a conceptual diagram showing a learning step and anidentification step in an identification system.

FIG. 2 is a block diagram of an identification system according to afirst embodiment.

FIG. 3 is a diagram showing a concept of an identification deviceaccording to the first embodiment.

FIG. 4 is a block diagram of a memory system including a semiconductormemory device according to the first embodiment.

FIG. 5 is a block diagram of the semiconductor memory device accordingto the first embodiment.

FIG. 6 is a diagram showing a memory cell array according to the firstembodiment.

FIG. 7 is a diagram showing threshold distribution of memory cellsaccording to the first embodiment.

FIG. 8 is a block diagram of a sense amplifier and data registerincluded in the semiconductor memory device according to the firstembodiment.

FIG. 9 is a circuit diagram showing the sense amplifier according to thefirst embodiment.

FIG. 10 is a flowchart showing an operation of the memory systemaccording to the first embodiment.

FIG. 11 is a diagram showing a command set and waveform chart in anoperation of the memory system in the identification step.

FIG. 12 shows a command sequence relating to a read operation.

FIG. 13 shows a command sequence relating to a write operation.

FIG. 14 is a diagram showing specific data stored in latch circuits andbit counter.

FIG. 15 is a diagram showing types of data stored in latch circuits.

FIG. 16 is a block diagram of a semiconductor memory device according toa second embodiment.

FIG. 17 is a circuit diagram showing an example of a source line controlcircuit according to the second embodiment.

FIG. 18 is a diagram showing an example of a normal read operation.

FIG. 19 is a diagram for explaining variations of cell current.

FIG. 20 is a diagram for explaining an example of a write operation inthe second embodiment.

FIG. 21 is a diagram showing an operation image of a word line WL andbit line BL in the second embodiment.

FIG. 22 is a diagram for explaining that an influence of variations ofcell current is eliminated.

FIG. 23 is a flowchart showing an operation of a memory system accordingto a modification of FIG. 10 .

FIG. 24 is a flowchart showing an operation after that shown in FIG. 23.

DETAILED DESCRIPTION

In generally, according to one embodiment, a memory system includes amemory controller configured to send a first command set includingarithmetic operation target data and an address that designates a memorycell to store weight data; and a nonvolatile semiconductor memoryconfigured to receive the first command set from the memory controller,read the weight data from the memory cell designated by the address,perform an arithmetic operation based on the arithmetic operation targetdata and the weight data, and send arithmetic operation result data tothe memory controller.

Hereinafter, embodiments will be described with reference to thedrawings. Some embodiments to be described below are mereexemplification of a device and method for embodying a technical idea,and the shape, configuration, arrangement, etc. of the components do notspecify the technical idea. Each function block is implemented in theform of hardware, software, or a combination thereof. The functionblocks are not necessarily separated as in the following examples. Forexample, some functions may be executed by a function block differentfrom the function block to be described as an example. In addition, thefunction block to be described as an example may be divided into smallerfunction subblocks. In the following description, elements having thesame function and configuration will be assigned the same referencesymbol, and a repetitive description will be given only where necessary.

<1> First Embodiment

<1-1> Configuration

<1-1-1> Overview of Identification System

In the present embodiment, an identification system (device) using aneural network will be described. The identification system learns aparameter for identifying the contents of identification target data(input data) in a learning step, and identifies the identificationtarget data based on the learning result in an identification step. Theidentification target data is data to be identified, and is image data,audio data, text data, or the like. Described below as an example is thecase where the identification target data is image data and a neuralnetwork that identify image data is used.

As shown in FIG. 1 , in the identification system according to thepresent embodiment, multiple data items (a data set) for training areinput to an identification device, which is part of the identificationdevice, in the learning step. The identification device constructs aneural network (trained model) based on the data set.

Specifically, the identification device constructs a neural network forclassifying identification target data. The identification device usesinput data and an evaluation of the label when constructing a neuralnetwork. The evaluation of the label includes a “positive evaluation”indicating that the contents of data match the label, and a “negativeevaluation” indicating that the contents of data do not match the label.The positive evaluation or negative evaluation is associated with ascore (truth score, or identification score), such as “0” data or “1”data, and the score is also referred to as Ground Truth. The “score” isa numerical value, and is the signal itself, which is exchanged in theneural network. The identification device performs an arithmeticoperation on an input data set, and adjusts a parameter used in thearithmetic operation to bring the identification score, which is theoperation result (also referred to as an inference), closer to the truthscore prepared in advance. The “identification score” indicates a degreeof matching between the input data set and the label associated with theinput data set. The “truth score” indicates an evaluation of the labelassociated with the input data set.

Once a neural network is constructed, the identification systemidentifies what the given data (the input data set) is by using theneural network in the identification step (output of an identificationresult).

<1-1-2> Configuration of Identification System

Next, the identification system according to the present embodiment willbe described with reference to FIG. 2 . FIG. 2 is a block diagramshowing a hardware configuration of the identification system.

As shown in FIG. 2 , the identification system 1 includes aninput/output interface (I/F) 2, a controller (central processing unit(CPU)) 3, a memory 4, and an identification device 5. The input/outputinterface 2, the controller 3, the memory 4, and the identificationdevice 5 are each connected to a controller bus.

The input/output interface 2 is, for example, an input/output controlcircuit (device) which receives a data set, and outputs anidentification result. The input/output interface 2 may be a UFSinterface based on the universal flash storage (UFS) standard, an SASinterface based on the serial attached SCSI (SAS) standard, or aninterface based on another standard, or may be a communication cableitself.

The controller 3 controls the entire identification system 1.

The memory 4 includes, for example, a random access memory (RAM) and aread only memory (ROM).

In the learning step, the identification device 5 learns features from,for example, a data set, and constructs a neural network. Theconstructed neural network is expressed as a weight coefficient (may bemerely referred to as a weight) used in each arithmetic operation unitin the identification device 5. Namely, the identification device 5constructs a neural network that, when input data corresponding to, forexample, an image including an image “X” is input, makes an outputindicating that the input data is image “X”. The identification device 5improves the accuracy of the neural network by receiving many input dataitems.

In the identification step, the identification device 5 obtains a weightcoefficient in the neural network. When the neural network is updated,the identification device 5 obtains a new weight coefficient of theneural network to improve the identification accuracy. Theidentification device 5 which has obtained the weight coefficientreceives input data to be identified. Then, the identification device 5inputs input data in the neural network using the weight coefficient,and identifies the input data.

Each function of the identification system 1 is realized by causing thecontroller 3 to read predetermined software into hardware such as thememory 4, and reading data from and writing data in the memory 4 undercontrol of the controller 3.

<1-1-3> Identification Device

<1-1-3-1> Concept of Identification Device

The neural network is modeled on the human brain, and consists of acollection of models modeled on nerve cells called neurons.

The neural network includes an input layer, an intermediate layer, andan output layer.

Information output from a neuron in the input layer is input to a neuronin the intermediate layer, and information output from a neuron in theintermediate layer is input to a neuron in the output layer.

The input to each neuron is a value obtained by multiplying input databy a weight and adding a bias to the resultant value. The final outputvalue is determined by subjecting the total value to a specificfunction. The function to determine the output value is an activationfunction. The activation function includes, for example, the sigmoidfunction, softmax function, identity function, and rectified linear unit(ReLU).

Next, a concept of the identification device 5 of the identificationsystem according to the present embodiment will be described withreference to FIG. 3 . FIG. 3 is a block diagram showing a concept of theidentification device 5 of the identification system according to thepresent embodiment. Here, a concept of the identification device 5 inthe learning step will be described.

As shown in FIG. 3 , the identification device 5 includes the inputlayer 51, the hidden layer 52, and the output layer 53.

In the input layer 51, input nodes are arranged in parallel. The inputnodes each obtain input data X and output (distribute) it to a node(nodes) included in the hidden layer 52. The node of the presentembodiment is a model modeled on a brain neuron. The node may bereferred to as a neuron.

FIG. 3 shows the case where the input layer 51 includes four parallelnodes for simplification. In FIG. 3 , data items X₁ to X₄ are stored inthe four nodes, respectively.

In the hidden layer 52, processing nodes are arranged in parallel. Theprocessing nodes each perform an arithmetic operation (product-sumoperation) on processing data using a weight coefficient, and output anoperation result (operation data) Y to a node or nodes of the subsequentlayer.

FIG. 3 shows the case where the hidden layer 52 includes three parallelnodes for simplification. The results of the product-sum operations arestored in the nodes of the hidden layer as data items Y₁ to Y₄. Thesedata items Y₁ to Y₄ are input data for the next product-sum operations.A plurality of edges from the input layer 51 to the hidden layer 52 areassociated with weights W₁₁ to W₃₄.

Hereinafter, the relationship between data X, data Y, and weight W willbe specifically described. The node in which data item Y₁ is storedstores the sum (ΣW_(1i)×W_(i)) of a product of weight W₁₁ and data itemX₁, a product of weight W₁₂ and data item X₂, a product of weight W₁₃and data item X₃, and a product of weight W₁₄ and data item X₄.Similarly, the node in which data item Y₂ is stored stores the sum(ΣW_(2i)×W_(i)) of a product of weight W₂₁ and data item X₁, a productof weight W₂₂ and data item X₂, a product of weight W₂₃ and data itemX₃, and a product of weight W₂₄ and data item X₄. Also, the node inwhich data item Y₃ is stored stores the sum (ΣW_(3i)×W_(i)) of a productof weight W₃₁ and data item X₁, a product of weight W₃₂ and data itemX₂, a product of weight W₃₃ and data item X₃, and a product of weightW₃₄ and data item X₄. Accordingly, the relationship is expressed byY_(k)=ΣW_(ki)×X_(i).

In the output layer 53, output nodes, the number of which is the same asthe number of labels, are arranged in parallel. The labels are eachassociated with identification target data. The output layer 53 performsan arithmetic operation using an activation function for each outputnode based on the data received from the hidden layer 52, and outputs anidentification score. Namely, the identification device 5 outputs anidentification score for each label. For example, when theidentification device 5 identifies three images of “car”, “tree”, and“human”, the output layer 53 has three output nodes arranged incorrespondence with the three labels, “car”, “tree”, and “human”. Theoutput nodes output an identification score corresponding to the labelof “car”, an identification score corresponding to the label of “tree”,and an identification score corresponding to the label of “human”. FIG.3 shows the case where the output layer 53 includes two parallel nodesfor simplification. As a result of the arithmetic operation using theactivation function, data items Z₁ and Z₂ are obtained from the nodes ofthe output layer 53.

The above-described number of nodes included in each of the input layer51, hidden layer 52 and output layer 53 may be changed as appropriate.In particular, the hidden layer 52 includes only a single-stageprocessing node group in the figure, but may include a two or more-stageprocessing nodes. Providing the hidden layer 52 with a multi-stageprocessing node group will be referred to as “deep learning”.

<1-1-3-2> Specific Configuration of Identification Device

<1-1-3-2-1> Memory System

Here, as a specific hardware configuration for realizing theidentification device 5, a memory system 400 will be described as anexample.

As shown in FIG. 4 , the memory system 400 includes a NAND flash memory100 and a memory controller 200. The memory controller 200 and NANDflash memory 100 may form one semiconductor device in combination, forexample. The semiconductor device is, for example, a memory card such asan SD™ card, or a solid state drive (SSD).

The NAND flash memory 100 includes a plurality of memory celltransistors, and nonvolatilely stores data. The NAND flash memory 100 isconnected to the memory controller 200 via NAND buses, and operatesbased on a host command (instruction) from the memory controller 200.Specifically, the NAND flash memory 100 transmits and receives, forexample, signals DQ0 to DQ7 (eight bits; hereinafter, where DQ0 to DQ7are not distinguished from each other, the signals will be merelyreferred to as signal DQ or signal DQ[7:0]) to and from the memorycontroller 200. Signals DQ0 to DQ7 include, for example, data, anaddress, and a command. The NAND flash memory 100 receives from thememory controller 200, for example, a chip enable signal CEn, a commandlatch enable signal CLE, an address latch enable signal ALE, a writeenable signal WEn, and a read enable signal REn. The NAND flash memory100 transmits a ready/busy signal R/Bn to the memory controller 200.

The chip enable signal CEn is a signal for enabling the NAND flashmemory 100, and is asserted, for example, at the low (“L”) level. Thecommand latch enable signal CLE is a signal indicating that signal DQ isa command, and is asserted, for example, at the high (“H”) level. Theaddress latch enable signal ALE is a signal indicating that signal DQ isan address, and is asserted, for example, at the “H” level. The writeenable signal WEn is a signal for taking a received signal into the NANDflash memory 100, and is asserted, for example, at the “L” levelwhenever a command, an address, data, or the like is received from thememory controller 200. Accordingly, whenever the write enable signal WEnis toggled, signal DQ is taken into the NAND flash memory 100. The readenable signal REn is a signal for the memory controller 200 to read datafrom the NAND flash memory 100. The read enable signal REn is asserted,for example, at the “L” level. The ready/busy signal R/Bn is a signalindicating whether the NAND flash memory 100 is in a ready state or in abusy state (in a state where a command is received from the memorycontroller 200 or in a state where a command isn't received therefrom),and is brought to the “L” level when the NAND flash memory 100 is in thebusy state, for example.

The memory controller 200 instructions the NAND flash memory 100 toread, write, or erase data in response to, for example, a host commandfrom the controller 3. The memory controller 200 also manages the memoryspace of the NAND flash memory 100.

The memory controller 200 includes a host interface circuit (host I/F)210, a memory (random access memory (RAM)) 220, a processor (centralprocessing unit (CPU)) 230, a buffer memory 240, a NAND interfacecircuit (NAND I/F) 250, and an error correction circuit (ECC) 260.

The host interface circuit 210 is connected to the outside (such as thecontroller 3) via a controller bus, and controls communication with theoutside. The host interface circuit 210 transfers a host command anddata received from the outside to the processor 230 and the buffermemory 240. The host interface circuit 210 also transfers data in thebuffer memory 240 to the outside in response to an instruction of theprocessor 230.

The NAND interface circuit 250 is connected to the NAND flash memory 100via the NAND buses, and controls communication with the NAND flashmemory 100. The NAND interface circuit 250 transfers an instructionreceived from the processor 230 to the NAND flash memory 100. At thetime of writing data, the NAND interface circuit 250 transfers writedata in the buffer memory 240 to the NAND flash memory 100. At the timeof reading data, the NAND interface circuit 250 transfers data read fromthe NAND flash memory 100 to the buffer memory 240.

The processor 230 controls the operation of the entire memory controller200. The processor 230 also issues various commands in response toexternal host commands, and transmits them to the NAND flash memory 100.For example, when externally receiving a write-related host command, theprocessor 230 transmits, in response thereto, a write-related NANDcommand to the NAND flash memory 100. Similar processing is performed atthe time of reading or erasing data. The processor 230 also executesvarious types of processing, such as wear leveling, for managing theNAND flash memory 100. The processor 230 also executes variousarithmetic operations. For example, the processor 230 executes dataencryption processing, randomization processing, and the like.

The error correction circuit 260 executes error correction processing ondata.

The memory 220 is a semiconductor memory such as a dynamic random accessmemory (DRAM) or a static RAM (SRAM), and is used as a work area of theprocessor 230. The memory 220 retains firmware for managing the NANDflash memory 100, various management tables, and the like.

Here, as a specific hardware configuration of the identification device5, the memory system 400 is described; however, the hardwareconfiguration is not limited to the memory system 400. As anotherexample, it is possible to adopt the memory controller 200 as a hardwareconfiguration of the controller 3, and adopt the NAND flash memory 100as a hardware configuration of the identification device 5.

<1-1-3-2-2> NAND Flash Memory 100

Next, a configuration of the NAND flash memory 100 will be describedwith reference to FIG. 5 . In FIG. 5 , some of the couplings betweenblocks are indicated by arrows; however, the couplings between blocksare not limited to those shown in FIG. 5 .

As shown in FIG. 5 , the NAND flash memory 100 includes an input/outputcircuit 15, a logic control circuit 16, a status register 18, an addressregister 19, a command register 20, a sequencer 17, a ready/busy circuit21, a voltage generator 22, a memory cell array 10, a row decoder 11, asense amplifier module 12, a data register/bit counter 13, and a columndecoder 14.

The input/output circuit 15 controls input/output of signal DQ to orfrom the memory controller 200. Specifically, the input/output circuit15 includes an input circuit and an output circuit. The input circuittransmits data DAT (write data WD) received from the memory controller200 to the data register/bit counter 13, transmits an address ADD to theaddress register 19, and transmits a command CMD to the command register20. The output circuit transmits status information STS received fromthe status register 18, data DAT (read data RD) received from the dataregister/bit counter 13, and an address ADD received from the addressregister 19 to the memory controller 200.

The logic control circuit 16 receives from the memory controller 200,for example, a chip enable signal CEn, a command latch enable signalCLE, an address latch enable signal ALE, a write enable signal WEn, anda read enable signal REn. The logic control circuit 16 controls theinput/output circuit 15 and the sequencer 17 in accordance with thereceived signal.

The status register 18 temporarily retains status information STS on,for example, a data write, read, or erase operation, and notifies thememory controller 200 whether or not the operation has been normallycompleted.

The address register 19 temporarily retains the address ADD receivedfrom the controller 200 via the input/output circuit 15. Then, theaddress register 19 transfers a row address RA to the row decoder 11,and a column address CA to the column decoder 14.

The command register 20 temporarily retains the command CMD receivedfrom the memory controller 200 via the input/output circuit 15, andtransfers it to the sequencer 17.

The sequencer 17 controls the operation of the entire NAND flash memory100. Specifically, in accordance with the command CMD retained by thecommand register 20, the sequencer 17 controls, for example, the statusregister 18, the ready/busy circuit 21, the voltage generator 22, therow decoder 11, the sense amplifier module 12, the data register/bitcounter 13, the column decoder 14, etc. to execute a write operation,read operation, erase operation, etc. The sequencer 17 includes aregister (not shown).

The ready/busy circuit 21 transmits a ready/busy signal R/Bn to thememory controller 200 in accordance with the operation state of thesequencer 17.

The voltage generator 22 generates voltages necessary for a writeoperation, read operation, and erase operation under control of thesequencer 17, and supplies the generated voltages to, for example, thememory cell array 10, the row decoder 11, the sense amplifier module 12,etc. The row decoder 11 and sense amplifier module 12 apply the voltagesupplied by the voltage generator 22 to the memory cell transistors inthe memory cell array 10.

The memory cell array 10 includes blocks BLK0 to BLKn (n is an integernot less than 0). The block BLK is a set of a plurality of nonvolatilememory cells, each of which is associated with a bit line and a wordline, and corresponds to a data erase unit, for example. The NAND flashmemory 100 may cause each memory cell to store two or more-bit data byadopting, for example, the multi-level cell (MLC) method.

The row decoder 11 decodes the row address RA. The row decoder 11selects one of the blocks BLK and further selects one of the memory cellunits based on the decoding result. The row decoder 11 applies anecessary voltage to the block BLK.

In a read operation, the sense amplifier module 12 senses data read fromthe memory cell array 10. Then, the sense amplifier module 12 transmitsread data RD to the data register/bit counter 13. In a write operation,the sense amplifier module 12 transmits write data WD to the memory cellarray 10.

The data register/bit counter 13 includes a plurality of latch circuits.The latch circuits each retain write data WD and read data RD. Forexample, in a write operation, the data register/bit counter 13temporarily retains write data WD received from the input/output circuit15, and transmits it to the sense amplifier module 12. For example, in aread operation, the data register/bit counter 13 temporarily retainsread data RD received from the sense amplifier module 12, and transmitsit to the input/output circuit 15.

In, for example, a write operation, read operation, or erase operation,the column decoder 14 decodes the column address CA, and selects a latchcircuit in the data register/bit counter 13 in accordance with thedecoding result.

<1-1-3-2-3> Memory Cell Array

FIG. 6 is a circuit diagram showing a configuration example of thememory cell array 10 included in the NAND flash memory 100 according tothe first embodiment, and shows a detailed circuit configuration of oneblock BLK in the memory cell array 10. As shown in FIG. 6 , the blockBLK includes, for example, four string units SU0 to SU3.

Each string unit SU includes a plurality of NAND strings NS associatedwith bit lines BL0 to BLm (m is an integer not less than 0),respectively. Each NAND string NS includes, for example, memory celltransistors MT0 to MT7 and select transistors ST1 and ST2.

The memory cell transistors MT each include a control gate and a chargestorage layer, and nonvolatilely stores data. The memory celltransistors MT0 to MT7 included in each NAND string NS are connected inseries between the source of select transistor ST1 and the drain ofselect transistor ST2. The control gates of memory cell transistors MT0of the NAND strings NS included in the same block BLK are connected incommon to word line WL0. Similarly, the control gates of memory celltransistors MT1 to MT7 of the NAND strings NS included in the same blockBLK are connected in common to respective word lines WL1 to WL7.Hereinafter, a plurality of memory cell transistors MT connected to acommon word line WL in each string unit SU are called a cell unit CU.The set of one-bit data stored in the cell unit is called a “page”.Therefore, when two-bit data is stored in one memory cell transistor MT,the cell unit stores data of two pages.

The select transistors ST1 and ST2 are used to select a string unit SUin various operations. The drains of select transistors ST1 included inthe NAND strings NS corresponding to the same column address areconnected in common to a corresponding bit line BL. The gates of selecttransistors ST1 included in string unit SU0 are connected in common toselect gate line SGD0. Similarly, the gates of select transistors ST1included in string units SU1 to SU3 are connected in common torespective select gate lines SGD1 to SGD3. The sources of selecttransistors ST2 in the same block BLK are connected in common to onesource line SL, and the gates of select transistors ST2 in the sameblock BLK are connected in common to one select gate line SGS.

In the above-described circuit configuration of the memory cell array10, the word lines WL0 to WL7 are provided for each block BLK. The bitlines BL0 to BLm are shared by a plurality of blocks BLK. The sourceline SL is shared by a plurality of blocks BLK. The above-describednumber of string units SU included in each block BLK and number of eachof the memory cell transistors MT and select transistors ST1 and ST2included in each NAND string NS are mere examples, and may be anynumber. The number of each of the word lines WL and the select gatelines SGD and SGS is changed based on the number of each of the memorycell transistors MT and the select transistors ST1 and ST2.

The threshold voltage distribution of the threshold voltages of aplurality of memory cell transistors MT of the memory cell array 10 is,for example, as shown in FIG. 7 . FIG. 7 shows a threshold voltagedistribution and read voltages of memory cell transistors MT of the casewhere each memory cell transistor MT stores two-bit data, in which thevertical axis corresponds to the number of memory cell transistors MT,and the horizontal axis corresponds to the threshold voltages Vth of thememory cell transistors MT. As shown in FIG. 7 , the memory celltransistors MT form a plurality of threshold voltage distribution lobesdepending on the bit numbers of data stored therein. Hereinafter, themulti-level cell (MLC) method, in which one memory cell transistor MTstores two-bit data, will be described as an example of the writemethod.

As shown in FIG. 7 , the memory cell transistors MT form four thresholdvoltage distribution lobes in the case of the MLC method. The fourthreshold voltage distribution lobes will be called an “Er” state, “A”state, “B” state, and “C” state in the ascending instruction of thethreshold voltage. In the MLC method, for example, “11 (lower, upper)”data, “10” data, “00” data, and “01” data are allocated to the “Er”state, “A” state, “B” state, and “C” state, respectively.

In the above-described threshold voltage distribution, a read voltage isset between adjacent threshold voltage distribution lobes. For example,a read voltage AR is set between the maximum threshold voltage of the“Er” state and the minimum threshold voltage of the “A” state, and isused for an operation to determine whether the threshold voltage of amemory cell transistor MT is included in the “Er”-state thresholdvoltage distribution lobe or in the “A”-state threshold distributionlobe. When read voltage AR is applied to the memory cell transistor MT,the memory cell transistors in the “Er” state are turned on, and thememory cell transistors in the “A” state, “B” state, and “C” state areturned off. The other read voltages are set in a similar manner. Readvoltage BR is set between the “A”-state threshold voltage distributionlobe and the “B”-state threshold voltage distribution lobe, and readvoltage CR is set between the “B”-state threshold voltage distributionlobe and the “C”-state threshold voltage distribution lobe. A read passvoltage VREAD is set at a voltage higher than the maximum thresholdvoltage of the highest threshold voltage distribution lobe. When theread pass voltage VREAD is applied to the gate of a memory celltransistor MT, the memory cell transistor MT is turned on regardless ofdata stored therein.

The above-described bit number of data stored in one memory celltransistor MT and data allocation to the threshold voltage distributionlobes of memory cell transistors MT are mere examples. Various dataallocations may be applied to the threshold voltage distribution lobes.The read voltages and read pass voltage may be set at the same voltagevalues or different values between the methods.

The memory cell array 10 may have a configuration other than theabove-described one. The memory cell array 10 may have the configurationdescribed in U.S. patent application Ser. No. 12/407,403, entitled“THREE-DIMENSIONAL STACKED NONVOLATILE SEMICONDUCTOR MEMORY”, filed onMar. 19, 2009, the configuration described in U.S. patent applicationSer. No. 12/406,524, entitled “THREE-DIMENSIONAL STACKED NONVOLATILESEMICONDUCTOR MEMORY”, filed on Mar. 18, 2009, U.S. patent applicationSer. No. 12/679,991, entitled “NONVOLATILE SEMICONDUCTOR MEMORY DEVICEAND MANUFACTURING METHOD THEREOF”, filed on Mar. 25, 2010, or U.S.patent application Ser. No. 12/532,030, entitled “SEMICONDUCTOR MEMORYand MANUFACTURING METHOD THEREOF”, filed on Mar. 23, 2009. The entirecontents of these patent applications are incorporated herein byreference.

<1-1-3-2-4> Sense Amplifier Module 12 and Data Register/Bit Counter 13

Next, a configuration of each of the sense amplifier module 12 and thedata register/bit counter 13 will be described with reference to FIG. 8.

As shown in FIG. 8 , the sense amplifier module 12 includes senseamplifiers SA(0) to SA(m) provided in correspondence with the respectivebit lines BL0 to BLm.

In a read operation, the sense amplifier SA senses data read out to thecorresponding bit line BL, and determines whether the read data is “0”or “1”. In a write operation, a voltage is applied to the bit line BLbased on write data WD.

The data register/bit counter 13 includes a data register 13A and a bitcounter 13B.

The data register 13A includes a latch circuit set 130 for each senseamplifier SA.

The latch circuit set 130 includes a plurality of latch circuits DL(0)to (X) (X is a given natural number), and latch circuit XDL, and anarithmetic operation circuit OP. The sense amplifier SA, latch circuitsDL(0) to (X), and latch circuit XDL are connected to one another in sucha manner that data are transmitted and received therebetween.

Latch circuits DL, for example, temporarily retain data. Latch circuitXDL temporarily retains read data RD received from the sense amplifierSA and write data WD received from the input/output circuit 15.Specifically, write data WD received by the input/output circuit 15 istransferred to one of latch circuits DL and sense amplifier SA via latchcircuit XDL. Read data RD received from the sense amplifier SA istransferred to the input/output circuit 15 via latch circuit XDL.

The arithmetic operation circuit OP performs an arithmetic operation(such as a product operation) based on data stored in latch circuitsDL(0) to (X) and latch circuit XDL.

The bit counter 13B receives a product operation result output from thelatch circuit set 130, and performs a sum operation.

<1-1-3-2-5> Sense Amplifier

A detailed circuit configuration of each of the above-described senseamplifiers SA is, for example, as shown in FIG. 9 . FIG. 9 shows anexample of the detailed circuit configuration of one sense amplifier SAin the sense amplifier module 12.

In, for example, a read operation, the sense amplifier SA senses dataread out to the corresponding bit line BL, and determines whether theread data is “0” or “1”. As shown in FIG. 9 , the sense amplifier SAincludes a PMOS transistor 30, NMOS transistors 31 to 37, and acapacitor 38.

One end of transistor 30 is connected to a power line, and the gate oftransistor 30 is coupled to node INV. One end of transistor 31 isconnected to the other end of transistor 30, the other end of transistor31 is connected to node COM, and control signal BLX is input to the gateof transistor 31. One end of transistor 32 is connected to node COM, theother end of transistor 32 is connected to the corresponding bit lineBL, and control signal BLC is input to the gate of transistor 32. Oneend of transistor 33 is connected to node COM, the other end oftransistor 33 is connected to node SRC, and the gate of transistor 33 isconnected to node INV. One end of transistor 34 is connected to theother end of transistor 30, the other end of transistor 34 is connectedto node SEN, and control signal HLL is input to the gate of transistor34. One end of transistor 35 is connected to node SEN, the other end oftransistor 35 is connected to node COM, and control signal XXL is inputto the gate of transistor 35. Clock CLK is input to one end oftransistor 36, and the gate of transistor 36 is connected to node SEN.One end of transistor 37 is connected to the other end of transistor 36,the other end of transistor 37 is connected to a bus LBUS, and controlsignal STB is input to the gate of transistor 37. One end of thecapacitor 38 is connected to node SEN, and clock CLK is input to theother end of the capacitor 38.

FIG. 9 also shows an example of a latch circuit DL.

As shown in FIG. 9 , the latch circuit DL includes inverters 40 and 41and NMOS transistors 42 and 43.

Inverter 40 has an input terminal connected to node LAT, and an outputterminal connected to node INV. Inverter 41 has an input terminalconnected to node INV, and an output terminal connected to node LAT. Oneend of transistor 42 is connected to node INV, the other end oftransistor 42 is connected to the bus LBUS, and control signal STI isinput to the gate of transistor 42. One end of transistor 43 isconnected to node LAT, the other end of transistor 43 is connected tothe bus LBUS, and control signal STL is input to the gate of transistor43. The circuit configurations of the other latch circuits DL are thesame, and descriptions thereof are omitted.

The configuration of the data register/bit counter 13 in the embodimentis not limited to this. For example, the number of latch circuits DLincluded in the data register/bit counter 13 may be any number. In thatcase, the number of latch circuits is designed based on, for example,the bit number of data retained by one memory cell transistor MT.Described above as an example is the case where the sense amplifiers SAare in one-to-one correspondence with the bit lines BL; however, theconfiguration is not limited to this. For example, a plurality of bitlines BL may be connected to one sense amplifier SA via a selector.

<1-2> Operation

<1-2-1> Operation Flow

An operation flow of the memory system 400 in the identification stepwill be described with reference to FIG. 10 . Described here is the casewhere identification target data is input to the memory system 400 andthe NAND flash memory 100 identifies the identification target data witha neural network stored in the memory cell array 10.

[S1001]

When externally receiving identification target data, the memorycontroller 200 issues a product-sum operation command set including thereceived identification target data to the input/output circuit 15 ofthe NAND flash memory 100. The product-sum operation command set is acommand set for causing the NAND flash memory 100 to function as theabove-described hidden layer 52. A specific example of the product-sumoperation command set will be described later.

[S1002]

Upon receipt of the product-sum operation command set, the input/outputcircuit 15 supplies a command in the product-sum operation command setto the sequencer 17. The sequencer 17 receives the command, therebyperforming a product-sum operation in the NAND flash memory 100.

[S1003]

Upon receipt of the product-sum operation command set, the input/outputcircuit 15 supplies identification target data (input data) in theproduct-sum operation command set to the data register 13A.

[S1004]

The data register 13A stores the received input data in latch circuitsDL.

[S1005]

The sequencer 17 causes the sense amplifiers SA to read weightcoefficients (hereinafter referred to as weight data) from the memorycell array 10 based on the product-sum operation command set.

[S1006]

The sense amplifiers SA supply the weight data read from the memory cellarray 10 to the data register 13A. The weight data corresponds to theweight coefficients of the neural network, and is used when performing aproduct-sum operation on processing data.

[S1007]

The data register 13A stores the received weight data in latch circuitsDL. The latch circuits DL in which the weight data is stored differ fromthe latch circuits DL storing the input data.

[S1008]

In accordance with an instruction of the sequencer 17, the data register13A performs product operations of stored input data and weight data.The data register 13A stores the results of the product operations inlatch circuits DL.

[S1009]

The data register 13A supplies the results of the product operations tothe bit counter 13B.

[S1010]

In accordance with an instruction of the sequencer 17, the bit counter13B performs a sum operation based on the results of the productoperations. This sum operation is performed by a digital operation oranalog operation. In this way, the above-mentioned product-sum operationis performed by the data register 13A performing product operations ofinput data and weight data and the bit counter 13B performing a sumoperation of the product operation results.

[S1011]

The bit counter 13B supplies the result of the product-sum operation tothe input/output circuit 15.

[S1012]

Then, the input/output circuit 15 supplies the result of the product-sumoperation to the memory controller 200.

The case where the product-sum operation is performed only once isdescribed here for simplification; however, the embodiment is notlimited to this. For example, when multi-stage processing nodes areprovided in the hidden layer 52, the NAND flash memory 100 may repeatsteps S1005 to S1010 in accordance with the number of stages.

<1-2-2> Command Set and Waveform Chart

The command set and waveform chart in the operation of the memory system400 in the identification step will be described with reference to FIG.11 .

As shown in FIG. 11 , when the NAND flash memory 100 is in the “readystate (R/Bn signal is at the “H” level)”, the memory controller 200issues a product-sum operation command set to the input/output circuit15 (S1001). The product-sum operation command set includes a firstcommand (XAH) and second command (XBH) for causing the NAND flash memory100 to execute a product-sum operation, and an address (ADD) fordesignating a memory cell storing weight data, and input data (DATA)used for the product-sum operation.

Upon receipt of the first command (XAH), address (ADD), input data(DATA), and second command (XBH) in instruction, the NAND flash memory100 starts a product-sum operation, and transitions from the “readystate (R/Bn signal is at the “H” level)” to the “busy state (R/Bn signalis at the “L” level)”.

Described below are selected word line WL, control signals INV, BLC,BLX, HLL, XXL, and STB, selected bit line BL, and source line SL in stepS1005.

At time T1, the sequencer 17 brings the voltage of control signal INV tothe “L” level, raises the voltage of control signal BLC from Vss toVblc, and raises the voltage of control signal BLX from Vss to Vblc.Accordingly, transistors 30, 31, and 32 of the relevant sense amplifierSA are turned on, and the voltage of the bit line BL is raised from Vssto VBL (see FIG. 9 ). The sequencer 17 also raises the voltage of thesource line SL from Vss to VSL.

At time T2, the sequencer 17 raises the voltage of the selected wordline WL from Vss to AR. Accordingly, when the selected memory cellconnected to the selected word line WL is turned on, the voltage of thebit line BL is lowered, whereas when the selected memory cell is notturned on, the voltage of the bit line BL is maintained. The sequencer17 also raises the voltage of control signal HLL from the “L” level tothe “H” level. Accordingly, transistor 34 is turned on, and node SEN ofthe sense amplifier SA is charged (see FIG. 9 ).

At time T3, the sequencer 17 lowers the voltage of control signal HLLfrom the “H” level to the “L” level, and raises the voltage of controlsignal XXL from the “L” level to the “H” level. Accordingly, transistor35 is turned on, and the bit line BL is electrically connected to nodeSEN via transistors 35 and 32. Therefore, the voltage of node SENbecomes a voltage based on the voltage of the bit line BL (see FIG. 9 ).

At time T4, the sequencer 17 raises the voltage of control signal STBfrom the “L” level to the “H” level while maintaining the voltage ofcontrol signal XXL at the “H” level. Accordingly, transistor 37 isturned on, and information based on the voltage of the gate electrode oftransistor 36 is transferred to the bus LBUS (see FIG. 9 ). The voltageof the bus LBUS is stored in a latch circuit DL as a result relating tovoltage AR.

Specifically, when the selected memory cell is turned on, the voltage ofthe bit line BL is low, and the voltage of node SEN is consequently low.Therefore, transistor 36 is turned off, and the voltage of the bus LBUSis maintained. In contrast, when the selected memory cell is turned off,the voltage of the bit line BL is maintained, and the voltage of nodeSEN is consequently maintained. Therefore, transistor 36 is turned on,and the bus LBUS is connected to CLK, and the voltage is lowered.

The operation from time T2 to time T5 as described above is an operationto read the “A” state (“A”-state read).

Next, from time T5 to time T6, the sequencer 17 raises the voltage ofthe selected word line WL from AR to BR, and performs the same operationas the above-described operation from time T2 to time T5, therebyperforming an operation to read the “B” state (“B”-state read).

Next, from time T6 to time T7, the sequencer 17 raises the voltage ofthe selected word line WL from BR to CR, and performs the same operationas the above-described operation from time T2 to time T5, therebyperforming an operation to read the “C” state (“C”-state read).

By performing the operations from time T1 to time T7 as described above,weight data are read out to latch circuits DL.

The sequencer 17 then performs product operations using the latchcircuit sets 130, and performs a sum operation using the bit counter13B. As a result, the sequencer 17 outputs the operation result of thebit counter 13B to the memory controller 200 as a product-sum operationresult (DATA) (S1012).

This transmissions/receptions of signals DQ will be collectivelyreferred to as a command sequence.

<1-2-3> Comparative Example

The difference between the command sequence in the present embodimentand those of a read operation and write operation will be described. Theread operation will be described with reference to FIG. 12 . As shown inFIG. 12 , in the read operation, the memory controller 200 first issuesa read command set to the NAND flash memory 100, whereby data is readfrom the memory cell array 10 of the NAND flash memory 100 out to thedata register/bit counter 13. The memory controller 200 then issues adata output command set to the NAND flash memory 100, thereby receivingthe data read out to the data register/bit counter 13.

Next, the write operation will be described with reference to FIG. 13 .As shown in FIG. 13 , in the write operation, the memory controller 200issues a write command set (including write data) to the NAND flashmemory 100, whereby write data are written in the memory cell array 10of the NAND flash memory 100.

As described above, in the read operation, data is output as signal DQby the memory controller 200 issuing a data output command set afterissuing a read command set (after transitioning to the busy state). Inthe write operation, write data are written in the memory cell array 10by the memory controller 200 issuing a write command set including writedata.

<1-3> Advantageous Effects

In the present embodiment, the memory controller 200 issues aproduct-sum operation command set including identification target dataand an address of weight data, thereby receiving a product-sum operationresult based on the identification target data and weight data from theNAND flash memory 100.

In recent years, the size of one page of the NAND flash memory hasincreased as many as several kilobytes. Therefore, the NAND flash memoryincludes a large-capacity data register, thereby exhibiting excellentSequential Write/Read performance. However, there has been no specificreport of application of such a technical advantage to AI technology.For example, if memory technology is applied to arithmetic operationmethods or algorithms characteristic of AI, a novel technical area maybe developed, which may contribute to human life and society.

The present embodiment enables a product-sum operation simply by causingthe memory controller 200 to issue a product-sum operation command setto a NAND flash memory with a large one-page size; therefore, ahigh-speed AI function is easily realized. Accordingly, mere use of theNAND flash memory makes it possible to easily obtain a high-quality AIfunction.

<1-4> Specific Example

A specific example of the first embodiment when identification targetdata is input to the NAND flash memory will be described. In particular,the flow of identification target data, weight data, and operationresults will be described.

As shown in FIG. 3 , when attention is focused on one identificationtarget data item (such as X₁), one data item is used for arithmeticoperations corresponding to the number of nodes arranged in parallel inthe hidden layer 52. For example, in the case of FIG. 3 , data item X₁is used for data items Y₁, Y₂, and Y₃. Namely, data item X₁ is subjectedto a product operation with each of weights W₁₁, W₂₁, and W₃₁. Theabove-described NAND flash memory performs one product operation withone latch circuit set 130. In the case of FIG. 3 , three productoperations are performed in relation to data X₁; therefore, three latchcircuit sets 130 are used. Specifically, as shown in FIG. 4 , theidentification target data items (X₁ to X₄) are assigned to each of thethree latch circuit sets 130. As described above, the number of requiredidentification target data items changes depending on the number ofproduct operations performed on one identification target data item. Inthis case, the number of required data items X₁ to X₄ is three each.Namely, the identification target data items input to the data register13A need to be X₁, X₁, X₁, X₂, X₂, X₂, X₃, X₃, X₃, X₄, X₄, and X₄. Thoseidentification target data items may be generated by the memorycontroller 200, by the sequencer 17, or by another component. Weightdata for performing a product operation with each identification targetdata item is read out from the memory cell array 10 to latch circuits.Then, the latch circuit set 130 performs a product operation of the readweight data and the identification target data item, and the productoperation result is stored in a latch circuit. Biases (constant terms)B₁ to B₃ added to the product-sum operation results are also stored inlatch circuits as weight data.

The bit counter 13B then reads out a product operation result from eachlatch circuit set 130, performs a sum operation, and outputs aproduct-sum operation result. The bit counter 13B generates data Y ofthe hidden layer and generates output data.

A specific method for using the latch circuit set 130 will be describedwith reference to FIG. 15 . FIG. 15 illustrates a case where each ofweight data and identification target data is four-valued(multi-valued).

As shown in FIG. 15 , an AR read result, a BR read result, and a CR readresult are required to enable the latch circuit set 130 to determinefour-valued data. In FIG. 15 , for example, an AR read result (“A” flag)is stored in latch circuit DL(A), a BR read result (“B” flag) is storedin latch circuit DL(B), and a CR read result (“C” flag) is stored inlatch circuit DL(C). The latch circuit set 130 determines weight databased on data stored in DL(A), DL(B), and DL(C). When weight data is notfour-valued, as-needed latch circuits DL may be used.

Four-valued identification target data is stored in, for example, twolatch circuits DL(D) and DL(E). When identification target data is notfour-valued, as-needed latch circuits DL may be used.

The product operation result is stored in, for example, latch circuitDL(F). However, another latch circuit DL may be used for the productoperation result.

The sum operation is performed by the bit counter 13B, and theproduct-sum operation result is stored in a storage area which is notshown.

<2> Second Embodiment

Next, the second embodiment will be described. In the first embodiment,data is determined via a bit line. In the second embodiment, the casewhere data is determined via the source line will be described.Hereinafter, descriptions of portions similar to those of the firstembodiment will be omitted.

<2-1> Specific Configuration of Identification Device

<2-1-1> NAND Flash Memory

Here, as a specific hardware configuration for realizing theidentification device 5, the memory system 400 will be described as anexample.

As shown in FIG. 16 , the NAND flash memory 100 included in the memorysystem 400 further includes a source line control circuit 23. The sourceline control circuit 23 controls the voltage of the source line SL.

<2-1-2> Voltage Generator and Source Line Control Circuit

The voltage generator 22 and source line control circuit 23 will bedescribed with reference to FIG. 17 .

FIG. 17 shows part of the voltage generator 22. The voltage generator 22includes a constant current source 50, NMOS transistors 51, 52, 54, and55, and a resistance element 53. In FIG. 17 , the voltage generator 22includes a circuit for generating signal BLC of the sense amplifiers SAand a circuit for charging the source line.

Specifically, the constant current source 50 generates current Iref1 andsupplies it as signal BLC. NMOS transistor 51 has one end and a gateelectrode which are connected to the output end of the constant currentsource 50.

NMOS transistor 52 has one end to which signal Vint is input, a gateelectrode to which signal Initialize is input, and the other endconnected to the other end of NMOS transistor 51.

One end of the resistance element 53 is connected to the other ends ofNMOS transistors 51 and 52.

NMOS transistor 54 has one end connected to the other end of theresistance element 53, a gate electrode to which signal SW to SRC isinput, and the other end connected to the source line SL.

NMOS transistor 55 has one end connected to the other end of theresistance element 53, a gate electrode to which signal SW to VSS isinput, and the other end connected to the reference voltage VSS.

The source line control circuit 23 includes a voltage comparator 23-1and a detection circuit 23-2. The source line control circuit 23monitors the total cell current (Icell_total), and convert it into adigital value. Namely, the circuit of FIG. 17 is an example of thecircuit for determining the cell-source current value (value of thecurrent flowing through the source line) with an analog circuit. In FIG.17 , the current value Icell_total corresponding to the product-sumoperation result is mirrored by a current mirror circuit, and iscompared with a current value (reference value) provided by a regulator.

The voltage comparator 23-1 compares the voltage of the source line SLwith reference voltage VREF_SRC, and provides the source line SL with avoltage. As shown in FIG. 17 , the voltage comparator 23-1 includes aPMOS transistor 60, a comparator 61, and an NMOS transistor 62.

PMOS transistor 60 has a gate to which a precharge signal PRECH isinput, one end externally supplied with voltage VCC, and the other endconnected to the source line SL. Signal PRECH is brought to the “L”level when the bit line is precharged in a data read operation, therebyturning on PMOS transistor 60. As a result, the voltage of the sourceline SL rises.

The comparator 61 has a non-inversion input terminal (+) connected tothe source line SL and an inversion input terminal (−) to which voltageVREF_SRC is input. Namely, the comparator 61 compares the voltage of thesource line SL with voltage VREF_SRC, and outputs an “H”-level signalwhen the voltage of the source line SL exceeds voltage VREF_SRC. VoltageVREF_SRC takes a value equal to or larger than the absolute value of theread level V01 for “0” data, of which threshold voltage is the lowest.

NMOS transistor 62 has a drain connected to the source line SL, agrounded source, and a gate provided with the comparison result of thecomparator 61. Hereinafter, the gate of NMOS transistor 62, i.e., theoutput node of the comparator 61 will be referred to as node G_Source.The gate width W of NMOS transistor 62 will be referred to as gate widthWsource1.

The detection circuit 23-2 includes PMOS transistors 70, 71, 74, and 75,a comparator 72, and NMOS transistors 73, 76, 77, 80, 81-1, 81-2, 82-1,82-2, 84-1, and 84-2.

PMOS transistor 70 has a source connected to the power-supply voltageVDD, and a gate and drain connected to each other. The node to which thegate and drain of PMOS transistor 70 are connected will be referred toas node P_GATE. For example, the current supplied by PMOS transistor 70is expressed as Iref2.

PMOS transistor 71 has a source connected to the power-supply voltageVDD, and a gate connected to node P_GATE. For example, the currentsupplied by PMOS transistor 71 is expressed as Iref3.

PMOS transistors 70 and 71 form a current mirror. Therefore, currentIref2 is proportional to current Iref3.

The comparator 72 has a non-inversion input terminal (+) connected tothe drain of PMOS transistor 70, and an inversion input terminal (−)connected to the drain of PMOS transistor 71. Namely, the comparator 72compares the voltage VA of the drain of PMOS transistor 70 with thevoltage VB of the drain of PMOS transistor 71, and outputs an “H”-levelsignal when voltage VA exceeds voltage VB.

NMOS transistor 73 has a drain connected to node P_GATE, a groundedsource, and a gate provided with the comparison result of comparator 61.The gate width W of NMOS transistor 73 will be referred to as gate widthWsource2.

PMOS transistor 74 has a source connected to the power-supply voltageVDD, and a gate and drain connected to each other.

PMOS transistor 75 has a source connected to the power-supply voltageVDD, a gate connected to the gate and drain of PMOS transistor 74, and adrain connected to node N_GATE.

PMOS transistors 74 and 75 form a current mirror.

NMOS transistor 76 has a drain and gate connected to node N_GATE, and agrounded source.

NMOS transistor 77 has a drain connected to the drain of PMOS transistor71, a gate connected to node N_GATE, and a grounded source.

NMOS transistors 76 and 77 form a current mirror.

NMOS transistor 80 has a drain and gate supplied with the referencecurrent Iref, and a grounded source.

NMOS transistor 81-1 has a drain connected to the gate and drain of PMOStransistor 74, and a gate supplied with the reference current Iref.

NMOS transistor 81-2 has a drain connected to the source of NMOStransistor 81-1, a gate supplied with signal 1 bai, and a groundedsource.

NMOS transistor 82-1 includes two parallel NMOS transistors (transistorshaving the same characteristics as NMOS transistor 81-1), each having adrain connected to the gate and drain of PMOS transistor 74, and a gatesupplied with the reference current Iref.

NMOS transistor 82-2 includes two parallel NMOS transistors (transistorshaving the same characteristics as NMOS transistor 81-2), each having adrain connected to the source of NMOS transistor 82-1, a gate suppliedwith signal 2 bai, and a grounded source.

NMOS transistor 84-1 includes four parallel NMOS transistors(transistors having the same characteristics as NMOS transistor 81-1),each having a drain connected to the gate and drain of PMOS transistor74, and a gate supplied with the reference current Iref.

NMOS transistor 84-2 includes four parallel NMOS transistors(transistors having the same characteristics as NMOS transistor 81-2),each having a drain connected to the source of NMOS transistor 82-1, agate supplied with signal 4 bai, and a grounded source.

The sequencer 17 brings signals 1 bai, 2 bai, and 4 bai to the “H” levelas appropriate, thereby controlling the values of the currents flowingthrough PMOS transistors 74 and 75. Therefore, the sequencer 17 controlsthe values of the currents flowing through NMOS transistors 76 and 77;as a result, voltage VB is controlled at will.

<2-2> Operation

As described above, the source line control circuit 23 causes thecurrent mirror circuit to mirror the current value Icell_totalcorresponding to the product-sum operation result, and compares thecurrent value Icell_total with the current value (reference value)provided by the regulator. To improve the accuracy of arithmeticoperations, it is necessary to reduce the variations of the cell currentIcell.

As shown in, for example, FIGS. 18 and 19 , even if a read operation isperformed by using read voltage AR and read voltage BR, it is notuncommon that, for example, the current Icell when voltage BR is appliedvaries from 20 nA to 100 nA.

Under the circumstances, in the second embodiment, magnituderelationship determination is performed with the read voltage changed instages, and thereby the absolute value of the cell-source current isfinally detected. This will be described with reference to FIG. 20 .

FIGS. 20 and 21 are diagrams for explaining an example of the readoperation in the second embodiment. In the second embodiment, forexample, read voltage AR applied to the selected word line (Selected WL)is divided into, for example, N stages for one state, such as A0R, A1R,. . . . As shown in FIG. 21 , a read is performed by first using readvoltage A0R, the current flowing through the source line SL ismonitored, and the bit line BL that allows a current to flowtherethrough is locked out. Then, a read is performed by using readvoltage A1R, the current flowing through the source line is monitored,and the bit line BL that allows a current to flow therethrough is lockedout. By using the other-stage read voltages, the same operation isrepeated. The sequencer 17 stores a read result in a latch circuit byraising signal STB whenever a read voltage is applied.

As shown in FIG. 22 , in every read operation in the above-describedprocess, Icell determined as “1” is even up at approximately 20 nA[nanoampere]. Therefore, the accuracy of the product-sum operation isimproved.

<2-3> Advantageous Effects

In the second embodiment, the product-sum operation result is detectedfrom the current flowing through the source line in a read operation, asdescribed above. Namely, the selected bit line BL is precharged based oninput data, and the bit line BL turned on by AR is locked out. Bysubsequently applying read voltages AR, BR, and CR, the current flowingthrough the source line is monitored at each time, and the product-sumoperation results are obtained from the current values.

At that time, by incrementing the read voltage in stages for each state,the adverse influence of the variations of the cell current on theaccuracy is decreased to such an extent that the influence is ignorable.This enables the product-sum operation result to be detected withsufficient accuracy from the current flowing through the source line ina read operation.

In particular, the sum operations are executed in the memory cell arrayat once in the second embodiment, which contributes to reduction in thechip size.

In existing semiconductor memory devices, all bit lines are selected ina read operation. Namely, there has been no idea of selecting a bit linein accordance with the logic level of input data. Therefore, it has beenimpossible to get an idea of implementing a product-sum operation.

In the second embodiment, however, the product-sum operation result isrealized by selecting a bit line in accordance with the logic level ofinput data, raising the threshold voltage in stages, locking out theturned-on bit line, and detecting the currents flowing through thesource line in the process of repeating the forgoing steps.

Accordingly, the second embodiment can also provide a semiconductormemory device with an arithmetic operation function.

<3> Others

The present invention is not limited to the above-described first andsecond embodiments. For example, in the first embodiment, the results ofthe product operations can be obtained before the result of theproduct-sum operation is obtained; therefore, the results of the productoperations may be taken out to the outside of the NAND flash memory 100.Furthermore, information that can be taken out to the outside of theNAND flash memory 100 may be the result of the product-sum operation, ormay be an inference obtained by substituting the result of theproduct-sum operation into an activation function.

In FIG. 10 , the NAND flash memory 100 supplies a product-sum operationresult to the memory controller 200 (step S1012). However, the NANDflash memory 100 may supply an inference (identification score) to thememory controller 200. The “inference” indicates a degree of matchingbetween the input data set (input data) and the label associated withthe input data. For example, when the input data is a picture, the NANDflash memory 100 infers what is in the picture (human, car, tree, etc.)of the input data. The result of the inference is referred to as aninference (identification score).

Here, a modification of FIG. 10 will be described with reference toFIGS. 23 and 24 .

[S1001]-[S1010]

The operations are the same as those described with reference to FIG. 10, and descriptions thereof are omitted.

[S1013]

Upon completion of the product-sum operation, the bit counter 13Bnotifies the completion to the sequencer 17.

[S1014]

The operations after step S1013 will be described with reference to FIG.24 .

Upon receipt of the notice of completion of the product-sum operation,the sequencer 17 determines whether the arithmetic operations have beenperformed up to the final layer. Specifically, the sequencer 17determines whether or not the processing at the final processing node ofa plurality of nodes included in the hidden layer 52 has been completed.

[S1015]

When determining that the processing at the final processing node hasnot been completed, the sequencer 17 performs a product-sum operationusing the latest product-sum operation result as input data.

Specifically, the sequencer 17 performs a calculation by inputting thelatest product-sum operation result stored in the data register 13A intothe activation function, and causes the data register 13A to store theoperation result of the activation function as input data for the nextlayer. When the relevant layer is the final layer, an inference isobtained by this step.

[S1016]

The data register 13A stores the operation result of the activationfunction as input data for the next layer. Then, the NAND flash memory100 repeats step S1005.

When determining that the processing at the final processing node hasnot been completed, the sequencer 17 repeats steps S1015, S1016, S1005to S1010, S1013, and S1014.

[S1017]

When determining that the processing at the final processing node hasbeen completed, the sequencer 17 causes the NAND flash memory 100 tooutput the operation result stored in the data register 13A as aninference.

[S1017]

The data register 13A supplies the inference to the input/output circuit15 in accordance with an instruction of the sequencer 17.

[S1018]

Then, the input/output circuit 15 supplies the inference to the memorycontroller 200. The NAND flash memory 100 may supply the inference(identification score) to the memory controller 200 in this manner.

While some embodiments have been described, the embodiments have beenpresented as examples, and are not intended to limit the scope of theinvention. These novel embodiments can be implemented in various otherforms, and various omissions, replacements, and changes can be madewithout departing from the spirit of the invention. These embodimentsand modifications thereof are included in the scope and spirit of theinvention, and are included in the scope of the claimed inventions andtheir equivalents.

The invention claimed is:
 1. A memory system comprising: a memorycontroller configured to send a command set including arithmeticoperation target data and an address that designates a memory cell tostore weight data; and a nonvolatile semiconductor memory connected tothe memory controller, wherein the nonvolatile semiconductor memoryincludes: the memory cell configured to store the weight data; a senseamplifier configured to read the weight data from the memory cell basedon the address when the command set is received; an arithmetic operationcircuit configured to perform an arithmetic operation based on thearithmetic operation target data and the weight data; a first latchcircuit configured to store the arithmetic operation target data; asecond latch circuit configured to store the weight data read frommemory cell; and an input/output circuit configured to receive thecommand set from the memory controller and to send arithmetic operationresult data based on a result of the arithmetic operation.
 2. The memorysystem according to claim 1, wherein the nonvolatile semiconductormemory further includes a voltage generator configured to apply voltagesto the memory cell and the sense amplifier based on the command set. 3.The memory system according to claim 1, wherein the nonvolatilesemiconductor memory further includes a column decoder configured toselect the second latch circuit based on the address.
 4. The memorysystem according to claim 1, wherein the nonvolatile semiconductormemory further includes a memory cell array including a plurality ofmemory cells, and is configured to identify the arithmetic operationtarget data by way of a neural network stored in the memory cell arraywhen the arithmetic operation target data is input.
 5. The memory systemaccording to claim 1, wherein the arithmetic operation result dataindicates a degree of matching between the arithmetic operation targetdata and a label associated with the arithmetic operation target data.6. The memory system according to claim 1, wherein the nonvolatilesemiconductor memory is a NAND flash memory.
 7. The memory systemaccording to claim 1, wherein the memory controller includes a firstinterface circuit configured to receive the arithmetic operation targetdata from an external apparatus and a second interface circuitconfigured to transmit the command set to the nonvolatile semiconductormemory.
 8. A nonvolatile semiconductor memory comprising: a memory cellconfigured to store weight data; a sense amplifier configured to readthe weight data from the memory cell based on an address that designatesthe memory cell to store the weight data when the command set includingarithmetic operation target data and the address is received; anarithmetic operation circuit configured to perform an arithmeticoperation based on the arithmetic operation target data and the weightdata; a first latch circuit configured to store the arithmetic operationtarget data; a second latch circuit configured to store the weight dataread from memory cell; and an input/output circuit configured toreceive, from a memory controller, the command set and to send, to thememory controller, arithmetic operation result data based on a result ofthe arithmetic operation.
 9. The nonvolatile semiconductor memoryaccording to claim 8, further comprising: a voltage generator configuredto apply voltages to the memory cell and the sense amplifier based onthe command set.
 10. The nonvolatile semiconductor memory according toclaim 8, further comprising: a column decoder configured to select thesecond latch circuit based on the address.
 11. The nonvolatilesemiconductor memory according to claim 8, further comprising: a memorycell array including a plurality of memory cells, wherein the arithmeticoperation target data is identified by way of a neural network stored inthe memory cell array when the arithmetic operation target data isinput.
 12. The nonvolatile semiconductor memory according to claim 8,wherein the arithmetic operation result data indicates a degree ofmatching between the arithmetic operation target data and a labelassociated with the arithmetic operation target data.
 13. Thenonvolatile semiconductor memory according to claim 8, wherein thenonvolatile semiconductor memory is a NAND flash memory.